package com.sunmall.dao;

import com.sunmall.pojo.Order;
import com.sunmall.pojo.OrderItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @description:
 * @author: mingtai
 * @createDate: 0:58 2020/4/14
 * @version: 1.0
 */
public interface OrderMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    void batchInsert(@Param("orderItemList") List<OrderItem> orderItemList);

    Order selectByUserIdAndOrderNo(@Param("userId") Integer userId, @Param("orderNo") Long orderNo);

    List<Order> selectByUserId(Integer userId);

    List<Order> selectAllOrder();

    Order selectByOrder(Long orderNo);
}